<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/socket.io.js"></script>
</head>
<body>
    <h1>Socket IO Test</h1>
    <script>
        var socket = io.connect('http://localhost:3001');
        socket.emit('id', {id: '59aaa561fdd9291970927d66'});
        socket.on('update', function(data) {
            alert('您有新的订单，请及时处理');
            // 更新操作
        });
    </script>
</body>
</html>